package com.mrx.commons.util.redis.adapter;

import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.core.query.SortQuery;
import org.springframework.data.redis.core.script.RedisScript;
import org.springframework.data.redis.core.script.ScriptExecutor;
import org.springframework.data.redis.core.types.RedisClientInfo;
import org.springframework.data.redis.hash.HashMapper;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.lang.NonNull;

import java.io.Closeable;
import java.time.Duration;
import java.time.Instant;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;

/**
 * @author : 肖康宁
 * @since : 2022-12-09 10:53
 **/
public abstract class FakeRedisTemplateAdapter<K, V> extends RedisTemplate<K, V> {

    @Override
    public void afterPropertiesSet() {
        super.afterPropertiesSet();
    }

    @Override
    public <T> T execute(@NonNull RedisCallback<T> action) {
        return super.execute(action);
    }

    @Override
    public <T> T execute(@NonNull RedisCallback<T> action, boolean exposeConnection) {
        return super.execute(action, exposeConnection);
    }

    @Override
    public <T> T execute(@NonNull RedisCallback<T> action, boolean exposeConnection, boolean pipeline) {
        return super.execute(action, exposeConnection, pipeline);
    }

    @Override
    public <T> T execute(@NonNull SessionCallback<T> session) {
        return super.execute(session);
    }

    @NonNull
    @Override
    public List<Object> executePipelined(@NonNull SessionCallback<?> session) {
        return super.executePipelined(session);
    }

    @NonNull
    @Override
    public List<Object> executePipelined(@NonNull SessionCallback<?> session, RedisSerializer<?> resultSerializer) {
        return super.executePipelined(session, resultSerializer);
    }

    @NonNull
    @Override
    public List<Object> executePipelined(@NonNull RedisCallback<?> action) {
        return super.executePipelined(action);
    }

    @NonNull
    @Override
    public List<Object> executePipelined(@NonNull RedisCallback<?> action, RedisSerializer<?> resultSerializer) {
        return super.executePipelined(action, resultSerializer);
    }

    @Override
    public <T> T execute(@NonNull RedisScript<T> script, @NonNull List<K> keys, @NonNull Object... args) {
        return super.execute(script, keys, args);
    }

    @Override
    public <T> T execute(@NonNull RedisScript<T> script, @NonNull RedisSerializer<?> argsSerializer, @NonNull RedisSerializer<T> resultSerializer, @NonNull List<K> keys, @NonNull Object... args) {
        return super.execute(script, argsSerializer, resultSerializer, keys, args);
    }

    @Override
    public <T extends Closeable> T executeWithStickyConnection(@NonNull RedisCallback<T> callback) {
        return super.executeWithStickyConnection(callback);
    }

    @NonNull
    @Override
    protected RedisConnection createRedisConnectionProxy(@NonNull RedisConnection connection) {
        return super.createRedisConnectionProxy(connection);
    }

    @NonNull
    @Override
    protected RedisConnection preProcessConnection(@NonNull RedisConnection connection, boolean existingConnection) {
        return super.preProcessConnection(connection, existingConnection);
    }

    @Override
    protected <T> T postProcessResult(T result, @NonNull RedisConnection conn, boolean existingConnection) {
        return super.postProcessResult(result, conn, existingConnection);
    }

    @Override
    public boolean isExposeConnection() {
        return super.isExposeConnection();
    }

    @Override
    public void setExposeConnection(boolean exposeConnection) {
        super.setExposeConnection(exposeConnection);
    }

    @Override
    public boolean isEnableDefaultSerializer() {
        return super.isEnableDefaultSerializer();
    }

    @Override
    public void setEnableDefaultSerializer(boolean enableDefaultSerializer) {
        super.setEnableDefaultSerializer(enableDefaultSerializer);
    }

    @Override
    public RedisSerializer<?> getDefaultSerializer() {
        return super.getDefaultSerializer();
    }

    @Override
    public void setDefaultSerializer(@NonNull RedisSerializer<?> serializer) {
        super.setDefaultSerializer(serializer);
    }

    @NonNull
    @Override
    public RedisConnectionFactory getRequiredConnectionFactory() {
        return super.getRequiredConnectionFactory();
    }

    @NonNull
    @Override
    public RedisSerializer<?> getKeySerializer() {
        return super.getKeySerializer();
    }

    @Override
    public void setConnectionFactory(@NonNull RedisConnectionFactory connectionFactory) {
        super.setConnectionFactory(connectionFactory);
    }

    @Override
    public void setKeySerializer(@NonNull RedisSerializer<?> serializer) {
        super.setKeySerializer(serializer);
    }

    @Override
    public Boolean expire(@NonNull K key, @NonNull Duration timeout) {
        return super.expire(key, timeout);
    }

    @NonNull
    @Override
    public RedisSerializer<?> getValueSerializer() {
        return super.getValueSerializer();
    }

    @Override
    public Boolean expireAt(@NonNull K key, @NonNull Instant expireAt) {
        return super.expireAt(key, expireAt);
    }

    @NonNull
    @Override
    public void setValueSerializer(@NonNull RedisSerializer<?> serializer) {
        super.setValueSerializer(serializer);
    }

    @Override
    public void restore(@NonNull K key, @NonNull byte[] value, long timeToLive, @NonNull TimeUnit unit) {
        super.restore(key, value, timeToLive, unit);
    }

    @NonNull
    @Override
    public RedisSerializer<?> getHashKeySerializer() {
        return super.getHashKeySerializer();
    }

    @Override
    public void setHashKeySerializer(@NonNull RedisSerializer<?> hashKeySerializer) {
        super.setHashKeySerializer(hashKeySerializer);
    }

    @NonNull
    @Override
    public RedisSerializer<?> getHashValueSerializer() {
        return super.getHashValueSerializer();
    }

    @Override
    public void setHashValueSerializer(@NonNull RedisSerializer<?> hashValueSerializer) {
        super.setHashValueSerializer(hashValueSerializer);
    }

    @NonNull
    @Override
    public RedisSerializer<String> getStringSerializer() {
        return super.getStringSerializer();
    }

    @Override
    public void setStringSerializer(@NonNull RedisSerializer<String> stringSerializer) {
        super.setStringSerializer(stringSerializer);
    }

    @Override
    public void setScriptExecutor(@NonNull ScriptExecutor<K> scriptExecutor) {
        super.setScriptExecutor(scriptExecutor);
    }

    @NonNull
    @Override
    public List<Object> exec() {
        return super.exec();
    }

    @NonNull
    @Override
    public List<Object> exec(@NonNull RedisSerializer<?> valueSerializer) {
        return super.exec(valueSerializer);
    }

    @NonNull
    @Override
    protected List<Object> execRaw() {
        return super.execRaw();
    }

    @Override
    public Boolean copy(@NonNull K source, @NonNull K target, boolean replace) {
        return super.copy(source, target, replace);
    }

    @Override
    public Boolean delete(@NonNull K key) {
        return super.delete(key);
    }

    @Override
    public Long delete(@NonNull Collection<K> keys) {
        return super.delete(keys);
    }

    @Override
    public Boolean unlink(@NonNull K key) {
        return super.unlink(key);
    }

    @Override
    public Long unlink(@NonNull Collection<K> keys) {
        return super.unlink(keys);
    }

    @Override
    public Boolean hasKey(@NonNull K key) {
        return super.hasKey(key);
    }

    @Override
    public Long countExistingKeys(@NonNull Collection<K> keys) {
        return super.countExistingKeys(keys);
    }

    @Override
    public Boolean expire(@NonNull K key, long timeout, @NonNull TimeUnit unit) {
        return super.expire(key, timeout, unit);
    }

    @Override
    public Boolean expireAt(@NonNull K key, @NonNull Date date) {
        return super.expireAt(key, date);
    }

    @Override
    public void convertAndSend(@NonNull String channel, @NonNull Object message) {
        super.convertAndSend(channel, message);
    }

    @Override
    public Long getExpire(@NonNull K key) {
        return super.getExpire(key);
    }

    @Override
    public Long getExpire(@NonNull K key, @NonNull TimeUnit timeUnit) {
        return super.getExpire(key, timeUnit);
    }

    @Override
    public Set<K> keys(@NonNull K pattern) {
        return super.keys(pattern);
    }

    @NonNull
    @Override
    public Cursor<K> scan(@NonNull ScanOptions options) {
        return super.scan(options);
    }

    @Override
    public Boolean persist(@NonNull K key) {
        return super.persist(key);
    }

    @Override
    public Boolean move(@NonNull K key, int dbIndex) {
        return super.move(key, dbIndex);
    }

    @Override
    public K randomKey() {
        return super.randomKey();
    }

    @Override
    public void rename(@NonNull K oldKey, @NonNull K newKey) {
        super.rename(oldKey, newKey);
    }

    @Override
    public Boolean renameIfAbsent(@NonNull K oldKey, @NonNull K newKey) {
        return super.renameIfAbsent(oldKey, newKey);
    }

    @Override
    public DataType type(@NonNull K key) {
        return super.type(key);
    }

    @Override
    public byte[] dump(@NonNull K key) {
        return super.dump(key);
    }

    @Override
    public void restore(@NonNull K key, @NonNull byte[] value, long timeToLive, @NonNull TimeUnit unit, boolean replace) {
        super.restore(key, value, timeToLive, unit, replace);
    }

    @Override
    public void multi() {
        super.multi();
    }

    @Override
    public void discard() {
        super.discard();
    }

    @Override
    public void watch(@NonNull K key) {
        super.watch(key);
    }

    @Override
    public void watch(@NonNull Collection<K> keys) {
        super.watch(keys);
    }

    @Override
    public void unwatch() {
        super.unwatch();
    }

    @Override
    public List<V> sort(@NonNull SortQuery<K> query) {
        return super.sort(query);
    }

    @Override
    public <T> List<T> sort(@NonNull SortQuery<K> query, RedisSerializer<T> resultSerializer) {
        return super.sort(query, resultSerializer);
    }

    @Override
    public <T> List<T> sort(@NonNull SortQuery<K> query, @NonNull BulkMapper<T, V> bulkMapper) {
        return super.sort(query, bulkMapper);
    }

    @Override
    public <T, S> List<T> sort(@NonNull SortQuery<K> query, @NonNull BulkMapper<T, S> bulkMapper, RedisSerializer<S> resultSerializer) {
        return super.sort(query, bulkMapper, resultSerializer);
    }

    @Override
    public Long sort(@NonNull SortQuery<K> query, @NonNull K storeKey) {
        return super.sort(query, storeKey);
    }

    @Override
    public void killClient(@NonNull String host, int port) {
        super.killClient(host, port);
    }

    @Override
    public List<RedisClientInfo> getClientList() {
        return super.getClientList();
    }

    @Override
    public void slaveOf(@NonNull String host, int port) {
        super.slaveOf(host, port);
    }

    @Override
    public void slaveOfNoOne() {
        super.slaveOfNoOne();
    }

    @NonNull
    @Override
    public ClusterOperations<K, V> opsForCluster() {
        return super.opsForCluster();
    }

    @NonNull
    @Override
    public GeoOperations<K, V> opsForGeo() {
        return super.opsForGeo();
    }

    @NonNull
    @Override
    public BoundGeoOperations<K, V> boundGeoOps(@NonNull K key) {
        return super.boundGeoOps(key);
    }

    @NonNull
    @Override
    public <HK, HV> BoundHashOperations<K, HK, HV> boundHashOps(@NonNull K key) {
        return super.boundHashOps(key);
    }

    @NonNull
    @Override
    public <HK, HV> HashOperations<K, HK, HV> opsForHash() {
        return super.opsForHash();
    }

    @NonNull
    @Override
    public HyperLogLogOperations<K, V> opsForHyperLogLog() {
        return super.opsForHyperLogLog();
    }

    @NonNull
    @Override
    public ListOperations<K, V> opsForList() {
        return super.opsForList();
    }

    @NonNull
    @Override
    public BoundListOperations<K, V> boundListOps(@NonNull K key) {
        return super.boundListOps(key);
    }

    @NonNull
    @Override
    public BoundSetOperations<K, V> boundSetOps(@NonNull K key) {
        return super.boundSetOps(key);
    }

    @NonNull
    @Override
    public SetOperations<K, V> opsForSet() {
        return super.opsForSet();
    }

    @NonNull
    @Override
    public <HK, HV> StreamOperations<K, HK, HV> opsForStream() {
        return super.opsForStream();
    }

    @NonNull
    @Override
    public <HK, HV> StreamOperations<K, HK, HV> opsForStream(@NonNull HashMapper<? super K, ? super HK, ? super HV> hashMapper) {
        return super.opsForStream(hashMapper);
    }

    @NonNull
    @Override
    public <HK, HV> BoundStreamOperations<K, HK, HV> boundStreamOps(@NonNull K key) {
        return super.boundStreamOps(key);
    }

    @NonNull
    @Override
    public BoundValueOperations<K, V> boundValueOps(@NonNull K key) {
        return super.boundValueOps(key);
    }

    @NonNull
    @Override
    public ValueOperations<K, V> opsForValue() {
        return super.opsForValue();
    }

    @NonNull
    @Override
    public BoundZSetOperations<K, V> boundZSetOps(@NonNull K key) {
        return super.boundZSetOps(key);
    }

    @NonNull
    @Override
    public ZSetOperations<K, V> opsForZSet() {
        return super.opsForZSet();
    }

    @Override
    public void setEnableTransactionSupport(boolean enableTransactionSupport) {
        super.setEnableTransactionSupport(enableTransactionSupport);
    }

    @NonNull
    @Override
    public void setBeanClassLoader(@NonNull ClassLoader classLoader) {
        super.setBeanClassLoader(classLoader);
    }

    @Override
    public RedisConnectionFactory getConnectionFactory() {
        return super.getConnectionFactory();
    }


}
